#include <cstdio>
#include <cstring>
int main()
{
    int n1,n2, N;
    char str[88] = { 0 };
    scanf("%s",str);
    N = strlen(str);
    n1 = (N+2) / 3;
    n2 = N - 2 * n1 +2;
    for (int i = 0; i < n1 - 1; ++i)
    {
        putchar(str[i]);
        for (int j = 0; j < n2 - 2; ++j)
        {
            putchar(' ');
        }
        putchar(str[N - i -1]);
        putchar(10);
    }
    for (int i = 0; i < n2; ++i)
    {
        putchar(str[i + n1 - 1]);
    }
    return 0;
}
